<template>
  <div class="error-container">
    <div class="error-content">
      <div class="error-code">404</div>
      <div class="error-title">页面不存在</div>
      <div class="error-description">
        抱歉，您访问的页面不存在或已被删除
      </div>
      <el-button size="large" @click="goHome">
        <el-icon><HomeFilled /></el-icon>
        返回首页
      </el-button>
    </div>
  </div>
</template>

<script lang="ts" setup>
const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style lang="scss" scoped>
.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f5f5f5;
  padding: 20px;
}

.error-content {
  text-align: center;
  max-width: 500px;
  padding: 60px 40px;
}

.error-code {
  font-size: 100px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 20px;
  color: #333;
}

.error-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 16px;
  color: #666;
}

.error-description {
  font-size: 14px;
  margin-bottom: 40px;
  color: #999;
  line-height: 1.6;
}

:deep(.el-button) {
  padding: 12px 32px;
  font-size: 14px;
  border-color: #dcdfe6;
  color: #606266;
  background-color: #fff;

  &:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background-color: #ecf5ff;
  }

  .el-icon {
    margin-right: 8px;
  }
}
</style>
